package cn.zzuzhm.spring.helloworld;


import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {

	public static void main(String[] args) {
		
		@SuppressWarnings("resource")
		ApplicationContext applicationContext = 
				new ClassPathXmlApplicationContext("applicationContext.xml");
		
	    Hello hello = (Hello) applicationContext.getBean("hello");
	    System.out.println(hello.hello());
	    
	    hello = (Hello) applicationContext.getBean("hello2");
	    System.out.println(hello);
	    
	    
	    ListBean listBean = applicationContext.getBean(ListBean.class);
	    System.out.println(listBean);
	    
	    MapBean mapBean = applicationContext.getBean(MapBean.class);
	    System.out.println(mapBean);
	    
	    PropertiesBean propertiesBean = applicationContext.getBean(PropertiesBean.class);
	    System.out.println(propertiesBean);
	}

}
